/**
 * //MARK 集合各模块的常用state 封装为getter 助力响应式获取数值
 */
const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  // TOKEN！！！
  token: state => state.user.token,
  // 用来确认是否有用户信息 以及标识用户
  userId: state => state.user.userInfo.userId,
  // 头像
  avatar: state => state.user.userInfo.staffPhoto,
  // 用户名称
  name: state => state.user.userInfo.username,
  // 有权限的路由
  routes: state => state.user.routes,
  // 公司名称
  company: state => state.user.userInfo.company,
  // 部门名称
  departmentName: state => state.user.userInfo.departmentName
}
export default getters
